//
//  GQRankListCell.m
//  TingMusic
//
//  Created by sunny on 16/4/20.
//  Copyright © 2016年 sunny. All rights reserved.
//

#import "GQRankListCell.h"
#import "GQRankSongListItem.h"

@interface GQRankListCell ()
@property (weak, nonatomic) IBOutlet UIImageView *picImageView;
@property (weak, nonatomic) IBOutlet UILabel *authorLabel;
@property (weak, nonatomic) IBOutlet UILabel *title_label;
@property (weak, nonatomic) IBOutlet UILabel *rankLabel;

@end

@implementation GQRankListCell

- (void)setSongListItem:(GQRankSongListItem *)songListItem
{
    _songListItem = songListItem;
    
    if (songListItem.pic_big.length) [self.picImageView sd_setImageWithURL:[NSURL URLWithString:songListItem.pic_big]];
    else [self.picImageView sd_setImageWithURL:[NSURL URLWithString:songListItem.pic_small]placeholderImage:[UIImage imageNamed:@"default"]];
    
    self.authorLabel.text = songListItem.author;
    self.title_label.text = songListItem.title;
    self.rankLabel.text = [NSString stringWithFormat:@"%02zd",songListItem.rank.integerValue];
    
    [self changCellTitleColor:[UIColor blackColor]];
}

- (void)changCellTitleColor:(UIColor *)changeColor
{
    self.authorLabel.textColor = changeColor;
    self.title_label.textColor = changeColor;
}
@end
